package Work5;

public class Teacher extends Work{
    int classnum;
    int day;

    public Teacher(String name, double money, int classnum, int day) {
        super(name, money);
        this.classnum = classnum;
        this.day = day;
    }

    @Override
    public void print() {
        System.out.println(getName()+" 工资:"+(getMoney()+classnum*day));
    }
}
